public class Calc 
{
	public static int result (int a, int b, String o) 
	{
		int result=0;
		
		switch(o) 
		{
			case "+": 	result=a+b; break;
			case "-": 	result=a-b; break;
			case "*": 	result=a*b; break;
			case "/": 	
			{
				if (b==0) 
				{
					throw new ArithmeticException("Деление на ноль"); 
				}
				result=a/b; break;
			}
			default: throw new ArithmeticException("Не верная операция");			
		}
		return result;
	}	
}
